summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-11-13 17:28:23 +0100
committerLiam <byteslice@airmail.cc>2023-11-13 17:28:23 +0100
commite3b510a4b4aa79e4fefadcbb3f33136016d35988 (patch)
treea0e1a312f31897e4df55182a2370633eb6f02b67
parentMerge pull request #11990 from german77/audio (diff)
downloadyuzu-e3b510a4b4aa79e4fefadcbb3f33136016d35988.tar
yuzu-e3b510a4b4aa79e4fefadcbb3f33136016d35988.tar.gz
yuzu-e3b510a4b4aa79e4fefadcbb3f33136016d35988.tar.bz2
yuzu-e3b510a4b4aa79e4fefadcbb3f33136016d35988.tar.lz
yuzu-e3b510a4b4aa79e4fefadcbb3f33136016d35988.tar.xz
yuzu-e3b510a4b4aa79e4fefadcbb3f33136016d35988.tar.zst
yuzu-e3b510a4b4aa79e4fefadcbb3f33136016d35988.zip
-rw-r--r--src/core/arm/arm_interface.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp
index 5e27dde58..558fba5bd 100644
--- a/src/core/arm/arm_interface.cpp
+++ b/src/core/arm/arm_interface.cpp
@@ -153,6 +153,14 @@ void ARM_Interface::Run() {
Kernel::KThread* current_thread{Kernel::GetCurrentThreadPointer(system.Kernel())};
HaltReason hr{};
+ // If the thread is scheduled for termination, exit the thread.
+ if (current_thread->HasDpc()) {
+ if (current_thread->IsTerminationRequested()) {
+ current_thread->Exit();
+ UNREACHABLE();
+ }
+ }
+
// Notify the debugger and go to sleep if a step was performed
// and this thread has been scheduled again.
if (current_thread->GetStepState() == StepState::StepPerformed) {
@@ -174,14 +182,6 @@ void ARM_Interface::Run() {
}
system.ExitCPUProfile();
- // If the thread is scheduled for termination, exit the thread.
- if (current_thread->HasDpc()) {
- if (current_thread->IsTerminationRequested()) {
- current_thread->Exit();
- UNREACHABLE();
- }
- }
-
// Notify the debugger and go to sleep if a breakpoint was hit,
// or if the thread is unable to continue for any reason.
if (True(hr & HaltReason::InstructionBreakpoint) || True(hr & HaltReason::PrefetchAbort)) {